<!DOCTYPE html>
<html lang="en">
	<head>
		<title>nTube: Redirecting...</title>
		<meta name="application-name" content="nTube" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<meta name="iwebkit-use-fruit-styled-layout" value="true;version=2" />
		<meta name="description" content="nTube: Redirecting..." />
		<meta charset="UTF-8" />
		<meta name="theme-color" content="#111111" />
		<meta name="robots" content="noindex, nofollow" />
		<link rel="manifest" href="/manifest.json" />
		<style>
			html {
				--root-background-color: #111111;
				--root-color: white;
				--root-font: sans-serif;
				--flat-box-border: 1px solid rgba(255, 255, 255, 0.2);
				--flat-box-shadow: 0 14px 28px rgba(255, 255, 255, 0.08), 0 10px 10px rgba(255, 255, 255, 0.08);
			}

			head,
			body {
				color: var(--root-color, #333333);
				background-color: var(--root-background-color, white);
				font-family: var(--root-font, "sans-serif");
			}

			.poly-item {
				padding-left: 5px;
				box-shadow: var(--flat-box-shadow, "0 14px 28px rgba(255, 255, 255, 0.08), 0 10px 10px rgba(255, 255, 255, 0.08)");
				border: var(--flat-box-border, "1px solid rgba(255, 255, 255, 0.2)");
				margin-bottom: 10px;
			}

			.nlang-string {
				content: "";
			}

			.menu {
				position: fixed;
				top: 0;
				margin: auto;
				left: 0;
				right: 0;
				width: 100%;
				height: 32px;
				border-bottom: 1px solid rgba(68, 68, 68, 0.875);
				background-color: #111111;
				margin-right: 0px;
				margin-left: -1px;
				z-index: 15;
			}
		</style>
		<script src="resources/promise-queues.js"></script>
		<script src="resources/libWeb.js"></script>
		<script src="resources/base.js"></script>
		<script src="resources/lang.js"></script>
		<script src="resources/new_ui.js"></script>
		<link rel="preload" href="resources/plyr/plyr.polyfilled.js" as="script" />
		<link rel="preload" href="resources/plyr/plyr.js" as="script" />
		<link rel="preload" href="resources/new_ui.js" as="script" />
		<style>
			#container {
				position: absolute;
				top: 45%;
				left: 40%;
				transform: translateX(-50%) translateY(-50%);
			}
		</style>
	</head>

	<body>
		<div class="menu">
			<p style="padding-left: 5px; vertical-align: middle; font-weight: bold; font-size: large; margin-top: 5px">
				<span style="color: red">n</span><span style="color: rgb(92, 250, 158)">T</span>
				<sub id="ntube_version_main_menu_label" style="font-size: xx-small; line-height: 20%; font-family: monospace"></sub>
			</p>
		</div>
		<div style="margin-top: 3%">
			<style type="text/css">
				.wrapper {
					position: absolute;
					height: 2px;
					left: 0;
					right: 0;
					bottom: 0;
					top: 32px;
					z-index: 3;
				}

				.loader {
					height: 100%;
					display: flex;
					-webkit-transform: translateZ(0);
					transform: translateZ(0);
				}

				.loader div {
					flex: 1;
					background: salmon;
					-webkit-animation: go 0.8s infinite alternate ease;
					animation: go 0.8s infinite alternate ease;
					box-shadow: 0 0 20px salmon;
				}

				.loader div:nth-child(1) {
					-webkit-animation-delay: -0.72s;
					animation-delay: -0.72s;
				}

				.loader div:nth-child(2) {
					-webkit-animation-delay: -0.64s;
					animation-delay: -0.64s;
				}

				.loader div:nth-child(3) {
					-webkit-animation-delay: -0.56s;
					animation-delay: -0.56s;
				}

				.loader div:nth-child(4) {
					-webkit-animation-delay: -0.48s;
					animation-delay: -0.48s;
				}

				.loader div:nth-child(5) {
					-webkit-animation-delay: -0.4s;
					animation-delay: -0.4s;
				}

				.loader div:nth-child(6) {
					-webkit-animation-delay: -0.32s;
					animation-delay: -0.32s;
				}

				.loader div:nth-child(7) {
					-webkit-animation-delay: -0.24s;
					animation-delay: -0.24s;
				}

				.loader div:nth-child(8) {
					-webkit-animation-delay: -0.16s;
					animation-delay: -0.16s;
				}

				.loader div:nth-child(9) {
					-webkit-animation-delay: -0.08s;
					animation-delay: -0.08s;
				}

				.loader div:nth-child(10) {
					-webkit-animation-delay: 0s;
					animation-delay: 0s;
				}

				@-webkit-keyframes go {
					100% {
						background: transparent;
						flex: 10;
						box-shadow: 0 0 0 transparent;
					}
				}

				@keyframes go {
					100% {
						background: transparent;
						flex: 10;
						box-shadow: 0 0 0 transparent;
					}
				}
			</style>
			<div class="wrapper" id="nplayer_loading">
				<div class="loader">
					<div></div>
					<div></div>
					<div></div>
					<div></div>
					<div></div>
					<div></div>
					<div></div>
					<div></div>
					<div></div>
				</div>
			</div>
		</div>
		<div id="container">
			<h1>
				<span style="color: red">n</span><span style="color: rgb(92, 250, 158)">Tube</span>
				<span class="nlang-string" ntube-lang-fallback="is now redirecting..." ntube-lang-key="ntube.lang.redirect_string">is now redirecting...</span>
			</h1>
			<p>
				<span class="nlang-string" ntube-lang-fallback="Redirecting to" ntube-lang-key="ntube.lang.redirect_to_string">Redirecting to</span> <span id="redir-url">$URL</span>.
				<br />
				<span class="nlang-string" ntube-lang-fallback="This will only be a moment." ntube-lang-key="ntube.lang.redirect_wait_string">This will only be a moment.</span>
			</p>
		</div>
		<script defer="defer">
			nTubeLocale.init();
			const _u = getQueryVariable("q");
			const _ll = getQueryVariable("portals_timeout_longer");
			const instant_redir_v = getQueryVariable("instant_redir");
			const instant_redir = instant_redir_v !== null && instant_redir_v !== undefined;
			if (_ll !== null && _ll !== undefined) {
				window.addEventListener("portalactivate", (evt) => {
					const data = evt.data;
					if (data["isActive"]) {
						window.location = _u;
					}
				});
			} else if (_u !== null && _u !== undefined && _u.length > 0) {
				id("redir-url").innerHTML = _u;
				window.onload = setTimeout(
					function () {
						window.location = _u;
					},
					instant_redir_v ? 10 : 2750
				);
			}
		</script>
	</body>
</html>
